package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

class zpa {
   int a;
   String b;
   String c;
   Worksheet d;
   HashMap e;
   String f;
   String g;
   String h;
   String i;
   String j;
   HashMap k;
   ArrayList l = null;
   zoz m = null;
   ArrayList n = new ArrayList();
   HashMap o = new HashMap();
   HashMap p = new HashMap();
   private static final com.aspose.cells.b.c.a.za q = new com.aspose.cells.b.c.a.za(new String[]{"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", "http://purl.oclc.org/ooxml/officeDocument/relationships/comments"});

   zoy a(String var1, String var2, boolean var3) {
      for(int var4 = 0; var4 < this.n.size(); ++var4) {
         zoy var5 = (zoy)this.n.get(var4);
         if (var1 != null && com.aspose.cells.b.a.zv.b(var5.c, var1) || var2 != null && com.aspose.cells.b.a.zv.b(var5.c, var2)) {
            if (var3) {
               this.n.remove(var4);
            }

            return var5;
         }
      }

      return null;
   }

   zow a(String var1, String var2) {
      zow var3 = null;
      if (var2 != null) {
         var3 = (zow)this.p.get(var2);
      }

      if (var3 == null && var1 != null) {
         var3 = (zow)this.p.get(var1);
      }

      return var3;
   }

   zpa(zoz var1, Worksheet var2) {
      this.m = var1;
      this.d = var2;
   }

   String a() {
      if (this.e != null && this.e.size() != 0) {
         Iterator var1 = this.e.values().iterator();

         while(var1.hasNext()) {
            zqe var2 = (zqe)var1.next();
            switch(q.a(var2.d)) {
            case 0:
            case 1:
               String var3 = var2.e;
               if (var3 != null && !"".equals(var3)) {
                  if (var3.charAt(0) == '/') {
                     return var3;
                  }

                  return "xl/" + var3.substring(3);
               }

               return null;
            }
         }

         return null;
      } else {
         return null;
      }
   }

   void a(ArrayList var1) {
      zajh.a(this.e, var1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/queryTable");
      zajh.a(this.e, var1, "http://schemas.microsoft.com/office/2011/relationships/timeline");
   }

   void b(ArrayList var1) {
      zajh.a(this.e, var1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slicer");
      zajh.a(this.e, var1, "http://schemas.microsoft.com/office/2007/relationships/slicer");
      zajh.a(this.e, var1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp");
      zajh.a(this.e, var1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image");
      zajh.a(this.e, var1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/queryTable");
      zajh.a(this.e, var1, "http://schemas.microsoft.com/office/2011/relationships/timeline");
   }

   String a(String var1) {
      if (var1 != null && this.e != null && this.e.containsKey(var1)) {
         zqe var2 = (zqe)this.e.get(var1);
         return var2.e;
      } else {
         return null;
      }
   }

   String b() {
      if (this.e == null) {
         return null;
      } else {
         Iterator var1 = this.e.values().iterator();

         zqe var2;
         do {
            if (!var1.hasNext()) {
               return null;
            }

            var2 = (zqe)var1.next();
         } while(!"http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableSingleCells".equals(var2.d));

         return var2.e;
      }
   }

   zqe b(String var1) {
      if (var1 != null && this.e.containsKey(var1)) {
         zqe var2 = (zqe)this.e.get(var1);
         return var2;
      } else {
         return null;
      }
   }
}
